package com.jhc;

import cn.dev33.satoken.secure.SaSecureUtil;

public class PwdUtil {
    public static String encodePassword(String plainPwd){
        return SaSecureUtil.rsaEncryptByPublic(PasswordKey.PUBLIC.getKey(), plainPwd);
    }
    public static String decodePassword(String pwd){
        return SaSecureUtil.rsaDecryptByPrivate(PasswordKey.PRIVATE.getKey(), pwd);
    }
}
